package com.szr.cloud.springboot_hello.reactor;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import reactor.core.Environment;
import reactor.core.Reactor;
import reactor.core.spec.Reactors;
import reactor.spring.context.config.EnableReactor;

@Configuration
@EnableReactor
public class ReactorConfig {

	@Bean
	Environment env(){
		return new Environment();
	}
	
	@Bean(name="rootReactor")
	public Reactor rootReactor(Environment env){
		return Reactors.reactor().env(env).dispatcher(Environment.RING_BUFFER).get();
	}
}
